import Layout from '@/layout/index';
import userStore from '@/store/modules/user';
var routes = function () {
    if (userStore().isAdmin) {
        return [
            {
                path: '',
                component: Layout,
                children: [
                    {
                        path: 'index',
                        noCache: false,
                        component: () => import('@/views/index.vue'),
                        name: 'Index',
                        meta: { title: '首页', icon: 'dashboard', affix: true, noCache: false, keepAlive: true }
                    }
                ]
            }

        ]
    } else {
        return [
            {
                path: '',
                component: Layout,
                children: [
                    {
                        path: 'index',
                        noCache: false,
                        component: () => import('@/views/index.vue'),
                        name: 'Index',
                        meta: { title: '首页', icon: 'dashboard', affix: true, noCache: false, keepAlive: true }
                    }
                ]
            },
           

        ]
    }
    return [];

}
export default routes